package cn.gbase.jiangsu.data.transfer.job;

import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;
import org.quartz.JobExecutionException;

import cn.gbase.jiangsu.data.transfer.service.CompanyCountService;
import cn.gbase.jiangsu.data.transfer.service.ProductService;

@IocBean
public class MainJob implements Setup {

	/** 
	 * Test Job == Print Job Name + Execute Time 
	 * @param context 
	 * @throws JobExecutionException 
	 */
	@Inject
	protected static CompanyCountService companyCountService;
	@Inject
	protected static ProductService productService;

	@Override
	public void destroy(NutConfig config) {

	}

	@Override
	public void init(NutConfig config) {
		if (companyCountService == null)
			companyCountService = config.getIoc().get(CompanyCountService.class);
		if (productService == null)
			productService = config.getIoc().get(ProductService.class);

	}

}